package com.wjs.gulimall.gulimallorder.service;

import com.atguigu.common.to.mq.SeckillOrderTo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.wjs.gulimall.gulimallorder.entity.OrderEntity;
import com.wjs.gulimall.gulimallorder.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author wangjingsong
 * @email wangjingsong@gmail.com
 * @date 2022-04-17 15:36:31
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfrimVo confirmOrder() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo subimtOrder(OrderSubmitVo vo);

    OrderEntity getOrderStatus(String orderSn);

    /**
     * 关闭订单
     * @param orderEntity
     */
    void closeOrder(OrderEntity orderEntity);


    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSecKillOrder(SeckillOrderTo to);
}

